<template>
  <el-dialog
    :title="$t('flycare.contract.conflict_title')"
    v-model="contractConflictVisible"
    width="50%"
  >
    <el-table :data="addContractResult" style="width: 100%">
      <el-table-column
        prop="billingServiceCode"
        :label="$t('modules.contract.billing_method')"
      >
        <template v-slot="scope">
          {{
            $t(
              'flycare.billing_service.' +
                scope.row.billingServiceCode +
                '.name'
            )
          }}
        </template>
      </el-table-column>
      <el-table-column
        prop="conflictReason"
        :label="$t('flycare.result_title')"
      >
        <template v-slot="scope">
          {{
            $t('flycare.contract.conflict_reason.' + scope.row.conflictReason)
          }}
        </template>
      </el-table-column> </el-table
    ><template #footer>
      <span class="dialog-footer">
        <el-button
          size="small"
          type="primary"
          :loading="confirmLoading"
          @click="closeDialog"
          >{{ $t('common.confirm') }}</el-button
        >
      </span></template
    >
  </el-dialog>
</template>
<script>
export default {
  data() {
    return {
      contractConflictVisible: false,
      confirmLoading: false,
      addContractResult: null
    }
  },
  methods: {
    openDialog(addContractResult) {
      this.contractConflictVisible = true
      this.addContractResult = addContractResult
    },
    closeDialog() {
      this.contractConflictVisible = false
    }
  }
}
</script>
